/*
pinia使用
1：安装  
2：src/store/index.ts
3:实例化
  import {createPinia} from 'pinia'
   export default createPinia()
4:在main.ts挂载
 import pinia from ..
  createApp(App).use(pinia)
5:创建模块处理
   src/store/modules/模块名.ts
6:创建模块内容
  import {defineStore} from 'pinia'
  export default defineStore('模块名',{
    state(){
        return {


        }
    },
    actions:{

    }
  })
7:模块化封装
   src/store/index.ts
   import use模块名  from '..'
   export function useStore(){
    return {
        模块名:use模块名()
    }
   }
8:使用
  import {useStore} from ...
  const {模块名}=useStore()
*/
import { createPinia } from 'pinia'
import useTest from './modules/test'
import useCategory from './modules/category'
import useHome from './modules/home'
import useGoods from './modules/goods'
export default createPinia()
export function useStore () {
  return {
    test: useTest(),
    category: useCategory(),
    home: useHome(),
    goods: useGoods()
  }
}
